package com.mybatis.mapper;

import com.mybatis.pojo.CatArea;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CatAreaMapper {
    int deleteByPrimaryKey(String id);
    int insert(CatArea record);
    int insertSelective(CatArea record);

    CatArea selectByPrimaryKey(String id);
    int updateByPrimaryKeySelective(CatArea record);
    int updateByPrimaryKeyWithBLOBs(CatArea record);
    int updateByPrimaryKey(CatArea record);

    List<CatArea> selectAllSysArea();

    List<CatArea> selectTreeList(@Param("id") String id);

    List<CatArea> selectByPrimaryKeyList(@Param("list") List<String> list);

    List<CatArea> selectByPidList(@Param("list") List<String> list);
    /**
     * 根据pid查询 地区
     * @param pid
     * @return
     */
    List<CatArea> selectByPid(@Param("pid") String pid);

    void insertBatch(@Param("list") List<CatArea> list);

    List<CatArea> selectAreaByLevel();
}